print(range(6))
for i in range(6):
    print("hello")

for i in ['one','two','three']:
    print(i)

# 遇到r就退出
for i in "helloworld":
    if i == "r":
        break
    print(i)
# 遇到r就跳过
print("遇到r就跳过")
for i in "helloworld":
    if i == "r":
        continue
    print(i)

print("--------------- 循环 + else ---------------")
# else 是for循环正常结束之后要执行的语句 ，
# 如果是break导致退出了循环，则不执行else中的语句
# 如果是continue跳过一次循环，还是会执行else中的语句
print("break + else")
i = 0
while i<10 :
    print(i)
    i+=1
    if(i == 5): break
else:
    print("循环结束")

print("continue + else ")
k = 0
while k<10:
    if (k >= 0):
        k += 1
        continue
    print(f"我是{k}")
else:
    print("循环结束")


for k in range(10) :
    print(f"我是{k}")
    if(k ==5) :
        k += 1
        continue
        #break
    k+=1
else:
    print("循环结束")